package com.persistence;
import java.io.Serializable;
import javax.persistence.*;


/**
 * The persistent class for the t_photo database table.
 * 
 */
@Entity
@Table(name="t_photo")
public class TPhoto implements Serializable {
	private static final long serialVersionUID = 1L;
	private int idPhoto;
	private byte[] data;
	private TPlayer TPlayer;

    public TPhoto() {
    }


	@Id
	@Column(name="id_photo")
	public int getIdPhoto() {
		return this.idPhoto;
	}

	public void setIdPhoto(int idPhoto) {
		this.idPhoto = idPhoto;
	}


    @Lob()
	public byte[] getData() {
		return this.data;
	}

	public void setData(byte[] data) {
		this.data = data;
	}


	//bi-directional one-to-one association to TPlayer
	@OneToOne(mappedBy="TPhoto", fetch=FetchType.EAGER, cascade = CascadeType.ALL)
	public TPlayer getTPlayer() {
		return this.TPlayer;
	}

	public void setTPlayer(TPlayer TPlayer) {
		this.TPlayer = TPlayer;
	}
	
}